


import java,javax
import prefuse

class SearchPanel(java.lang.Object):
	search=None
	f=None
	def __init__(self,parent,viz,x):
		self.search = prefuse.util.ui.JSearchPanel(viz,"graph.nodes","label")
		search=self.search
		search.setShowResultCount(True);
		search.setBorder(javax.swing.BorderFactory.createEmptyBorder(5,5,4,0));
		search.setFont(prefuse.util.FontLib().getFont("Tahoma", java.awt.Font.PLAIN, 11));
		x.add(search);
		x.setBackground(java.awt.Color.WHITE)
		self.f = x


class SearchEngine(java.lang.Object):
	def __init__(dbFile):
		if dbFile is None:
			sEng = prefuse.data.search.LuceneSearcher()  #creates in memory database
		else:
			return None

	def add(tupleset):
		# add in tuple sets
		sEng.add(tupleset)
		pass